package com.ruoyi.datastatistics.controller;

import com.ruoyi.common.core.domain.Parameter;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.datastatistics.domain.HomepageResult;

import com.ruoyi.datastatistics.service.HomepageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/homepage")
public class HomepageController extends BaseController {

    @Autowired
    private HomepageService homepageService;

    @PostMapping("/gettotal")
    public Map<String,Object> gettotaldata(@RequestBody Parameter parameter){
        return homepageService.gettotaldata(parameter);
    }
    @PostMapping("/getnexttotalbyday")
    public Map<String,Object> getnexttotalbyday(@RequestBody Parameter parameter){
        return homepageService.getnexttotalbyday(parameter);
    }
    @PostMapping("/dengjixinxiData")
    public Object dengjixinxiData(@RequestParam String shenfenzhenghao, @RequestParam String year){
        return homepageService.dengjixinxiData(shenfenzhenghao,year);
    }
    @PostMapping("/itemnameData")
    public Object itemData(@RequestParam String shenfenzhenghao, @RequestParam String year,@RequestParam String testtime){
        return homepageService.itemData(shenfenzhenghao,year,testtime);
    }
    @PostMapping("/personalReport")
    public Object personalReport(@RequestParam String idcard,@RequestParam String datasheet,@RequestParam String testtime) {
        return homepageService.personalReport(idcard, datasheet,testtime);
    }
    @PostMapping("/loginapp")
    public Object loginapp(@RequestParam String username,@RequestParam String password) {
        return homepageService.loginapp(username, password);
    }

    @PostMapping("/personaltrend")
    public Object personaltrend(@RequestParam String idcard,@RequestParam String year) {
        return homepageService.personaltrend(idcard, year);
    }
}
